module.exports = {
  chainWebpack: (config) => {
    // 移除 prefetch 插件
    config.plugins.delete("preload");
    config.plugins.delete("prefetch");
  },
  productionSourceMap: false,
  devServer: {
    // open: true,
    // port: 8080, // 自定义修改8080端口
    proxy: {
      "/api": {
        // target: "http://0pu9c57e.dongtaiyuming.net",
        // target: "http://192.168.124.30",
        target: "http://192.168.3.93:8082",
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    },
  },
  css: {
    loaderOptions: {
      postcss: {
        plugins: [
          require("postcss-pxtorem")({
            rootValue: 100, // 换算的基数
            selectorBlackList: [".section"], // 忽略转换正则匹配项
            propList: ["*"],
          }),
        ],
      },
    },
  },
  publicPath: "./",
  outputDir: "dist", //build输出目录
  assetsDir: "assets", //静态资源目录（js, css, img）
  lintOnSave: false, //是否开启eslint
};